import request from '@/utils/request'

export function add(data) {
  return request({
    url: '/house',
    method: 'post',
    data
  })
}
export function update(data) {
  return request({
    url: '/house',
    method: 'put',
    data
  })
}

export function removeHouse(id) {
  return request({
    url: '/house/' + id,
    method: 'delete'
  })
}
export function exportExcel(data) {
  return request({
    url: '/house/exportExcel',
    method: 'post',
    data
  })
}

export function updateTag(data) {
  return request({
    url: '/house/updateTag',
    method: 'put',
    data
  })
}

export function page(data) {
  return request({
    url: '/house/page',
    method: 'post',
    data
  })
}
export function pageByAddress(data) {
  return request({
    url: '/house/pageByAddress',
    method: 'post',
    data
  })
}
export function pageByOwnerId(data) {
  return request({
    url: '/house/pageByOwnerId',
    method: 'post',
    data
  })
}

export function getById(token) {
  return request({
    url: '/house',
    method: 'get',
    params: { token }
  })
}

export function pageDetail(id) {
  return request({
    url: '/house/' + id,
    method: 'get'
  })
}

export function getHouseViewListByHouseId(id) {
  return request({
    url: 'houseFile/list/' + id,
    method: 'get'
  })
}

export function gettransferOut(data) {
  return request({
    url: 'house/transferOut/',
    method: 'post',
    data
  })
}

export function pageByOperation(data) {
  return request({
    url: '/house/pageByOperation',
    method: 'post',
    data
  })
}
